home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 11
/
CU Amiga Magazine's Super CD-ROM 11 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-06].iso
/
s
/
insertpersonalinfo.pprx
< prev
next >
Wrap
Text File
|
1992-03-14
|
2KB
|
107 lines
/*
@BInsertPersonalInfo @P@ICopyright Gold Disk Inc., February, 1992
This Genie will insert personal information which is saved in the PPage.config file into a text box at the current cursor location.
(See also EnterPersonalInfo Genie).
*/
cr = '0a'x
boxnum = ppm_BoxNum()
if word(ppm_GetState(), 1) ~= "3" then
exit_msg("You must be select a box to edit first")
if getclip(ppuser_name) = '' & getclip(ppuser_company) = '' then
call getinfo()
info = "1 - Name"cr"2 - Company Name"cr"3 - Address"cr"4 - City"cr"5 - State / Province"cr"6 - Country"cr"7 - Zipcode / PostalCode"cr"8 - Phone"cr"9 - Fax"
sepinfo = "Separate by comma"cr"Separate by carriage return"
info = ppm_SelectFromList("Select options", 28, 5, 1, info)
if info = '' then exit_msg()
sepinfo = ppm_SelectFromList("Select options", 30, 2, 0, sepinfo)
if sepinfo = '' then exit_msg()
if pos('comma', sepinfo) ~= 0 then
delimiter = ', '
else
delimiter = '0a'x
string = ''
do while info ~= ''
parse var info item '0a'x info
text = getclip("PPUSER_"upper(word(item, 3)))
if text ~= '' then string = string || delimiter || text
end
string = delstr(string, 1, 1)
call ppm_InsertText(string)
exit_msg()
/*
* exit_msg PROCEDURE
*/
exit_msg: procedure
do
parse arg message
if message ~= '' then call ppm_Inform(1,message,)
exit
end
/*
* getinfo PROCEDURE
*/
getinfo: procedure
cr = '0a'x
do
startclip = "/*****Start Clips*****/"
endclip = "/*****End Clips*****/"
startupfile = "s:ppage.config"
startup = ''
clist = 0
if ~open(file, startupfile, "r") then
do
address command
call pragma(d, "rexx:")
call EnterPersonalInfo.pprx()
exit_msg()
end
do while ~eof(file)
text = readln(file)
if text = startclip then
do
clist = 2
clips.1 = startclip
do while ~ eof(file)
text = readln(file)
if strip(text) = '' then iterate
clips.clist = text
clist = clist + 1
if text = endclip then
do
text = ''
leave
end
end
clist = clist - 1
end
startup = startup || cr || text
end
call close(file)
if exists(startupfile) then
do
address command
'copy' startupfile startupfile".bak"
address
end
call EnterPersonalInfo.pprx()
call close(file)
return
end